import React,{ Component } from "react";
import { Text,View,StyleSheet,Image,Dimensions } from "react-native";
const { width,height } = Dimensions.get("window");
import SplashScreen from 'react-native-splash-screen'
export default class WelcomeHome extends Component {

    componentDidMount(): void {
        const { navigation } = this.props;
        SplashScreen.hide();
        setTimeout(()=>{
            navigation.navigate("BottomTab");
        },2000)
    }

    render(){
        return (
            <View style={ styles.text }>
               <Image style={ styles.img } resizeMode={"stretch"} source={require("../res/image/welcomeTo.jpg")} />
            </View>
        )
    }
}

const styles = StyleSheet.create({
    text:{
        flex:1,
        alignItems: 'center',
        justifyContent: 'center',
        fontSize:30,
    },
    img:{
        width:width,
        height:height,
    }
});